////////////////////////////////////////////////////////////////////////////////
//
//  FLEX USER GROUP HOKURIKU
//  Copyright 2009 Flex User Group Hokuriku
//  All Rights Reserved.
// 
//  NOTICE: Flex User Group Hokuriku permits you to use, 
//  modify, and distribute this file 
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
package net.fxug.hokuriku.chocolat.utils
{
    import org.flexunit.assertThat;
    import org.hamcrest.core.isA;


    public class DataConvertorTest
    {
        // Reference declaration for class to test
        private var classToTestRef:net.fxug.hokuriku.chocolat.utils.DataConvertor;

        public function DataConvertorTest()
        {
        }

        [Test]
        public function testConvertArray():void
        {
            var ret:String = DataConvertor.convertArray("A", [1, 2, 3]);
            assertThat(ret, isA("A=1,2,3"));
        }

        [Test]
        public function testConvertArray2():void
        {
            var ret:String = DataConvertor.convertArray("A", ["a", "b", "c"]);
            assertThat(ret, isA("A=a,b,c"));
        }

        [Test]
        public function testConvertArrayNull():void
        {
            var ret:String = DataConvertor.convertArray("A", null);
            assertThat(ret, isA(""));
        }

        [Test(expected="ArgumentError")]
        public function testConvertArrayNullName():void
        {
            var ret:String = DataConvertor.convertArray(null, null);
            assertThat(ret, isA(""));
        }

//		[Test]
//		public function testDataConvertor():void
//		{
//			// Add your test logic here
//			Assert.fail("Test method Not yet implemented");
//		}
    }
}